package action;

import data.Event;

public class Help extends Action
{

	private String[] commandList = { "add add", "delete", "edit", "star", "unstar", "tick", "untick",
			"login", "logout", "find", "search", "hide", "postpone", "checkif", "overdue", "reminder", "update",
			"undo"
	};

	@Override
	public Event[] execute(String userCommand) {
		Add help = new Add();
		if (new Find().execute("find @help") == new Event[0] || new Find().execute("find @help") == null) {
			for (String command: commandList) {
				help.execute(command + " @help");
			}
		}
		return new Event[0];
	}

	@Override
	public Event[] undo() {
		return null;
	}

	@Override
	public boolean isUndoable() {
		return false;
	}

	@Override
	public String errorMessage() {
		return null;
	}

	@Override
	public String getCommandName() {
		return "help";
	}

}
